package com.lantu.sys.mapper;

import com.lantu.sys.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ljg
 * @since 2023-02-23
 */
public interface UserMapper extends BaseMapper<User> {

    @Select("SELECT b.role_name FROM x_user_role a,x_role b WHERE a.user_id=#{userId}")
    public List<String> getRoleNameByUserId(Integer userId);

}
